package math;

import java.util.*;
import java.util.stream.*;

public class FunctionCallNode implements MathNode
{
    String symbol;
    List<MathNode> arguments;

    public FunctionCallNode(String f,List<MathNode> a)
    {
        this.symbol = f;
        this.arguments = a;
    }

    @Override
    public String getExpressionString()
    {
        return symbol + "(" + arguments.stream().map(mn -> mn.getExpressionString()).collect(Collectors.joining(", ")) + ")";
    }
}

